package com.ocm.core.mapping;

import org.springframework.stereotype.Component;

import com.googlecode.simpleobjectassembler.converter.AbstractObjectConverter;
import com.ocm.core.domain.Status;

@Component
public class IntegerToStatusConvert extends AbstractObjectConverter<Integer, Status> {

   @Override
   public void convert(Integer sourceObject, Status destinationObject) {
      destinationObject = Status.getStatus(sourceObject.intValue());
   }

   @Override
   public Status createDestinationObject(Integer sourceObject) {
      return Status.getStatus(sourceObject.intValue());
   }
}
